<%@tag import="com.zhiqingchun.common.Page" pageEncoding="utf-8"%>
<%@attribute name="formName" description="formName" required="true" %>
<div class="pager">
	共 <span id="recordCount">${page.recordCount}</span> 条记录&nbsp;
	每页<input id="pageNumber" name="pageNumber" style="width:20px;" value="${page.pageNumber}" />条&nbsp;
	当前<input id="pageIndex" name="pageIndex" style="width:20px;" value="${page.pageIndex}" />页/共 <span>${page.pageCount}</span> 页&nbsp;
	<a href="javascript:void gotoPage.first();">
		<img align="absmiddle" alt="首页" title="首页" src="${ path }/img/pageNum/shouye.gif" />
	</a>
	<a href="javascript:void ${ page.pageIndex > 1 ? 'gotoPage.pre()' : '(0)' };">
		<img align="absmiddle" alt="上一页" title="上一页" src="${ path }/img/pageNum/qianye.gif" />
	</a>
	<a href="javascript:void ${ page.pageIndex < page.recordCount ? 'gotoPage.next()' : '(0)' };">
		<img align="absmiddle" alt="下一页" title="下一页" src="${ path }/img/pageNum/houye.gif" />
	</a>
	<a href="javascript:void gotoPage.last();">
		<img align="absmiddle" alt="尾页" title="尾页" src="${ path }/img/pageNum/moye.gif" />
	</a>
	<input type="image" align="absmiddle" src="${ path }/img/pageNum/go_s.gif" title="转到指定页" />
	<script type="text/javascript">
		var gotoPage = {
				checkNumber : function(input){
					input.value = input.value.replace(/\D/g, "");
				},
				send : function(){
					var form = document.forms["${ formName }"];
					if(form){
						form.submit();
					}
				},
				first : function(){
					document.getElementById("pageIndex").value = 1;
					this.send();
				},
				pre : function(){
					document.getElementById("pageIndex").value = "${page.pageIndex-1}";
					this.send();
				},
				next : function(){
					document.getElementById("pageIndex").value = "${page.pageIndex+1}";
					this.send();
				},
				last : function(){
					document.getElementById("pageIndex").value = "${page.pageCount}";
					this.send();
				}
		};
	</script>

</div>